package com.ssx.cloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Package com.ssx.cloud.config
 * @ClassName ApplicationContextConfig
 * @Copyright: Copyright (c) 2020
 * @Date 2020/11/19 16:23
 * @Company www.sudaoxi.com.cn
 * @Author 苏道羲
 * @Version 1.0
 * @Description
 */
@Configuration
public class ApplicationContextConfig {
    @LoadBalanced   //开启负载均衡，轮询
    @Bean
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
